package io.gitee.buzizhi.enums;

/**
 * 定义返回状态
 */
public enum ApiStatusEnum {

    SUCCESS(0, "成功"),
    FAIL(-1, "失败"),
    PARAMETER_BAD(400, "参数有误"),
    LOGIN_INVALID(401,"登陆已失效"),
    ERROR(500, "系统繁忙，请稍后重试"),

    ;
    private final int code;
    private final String msg;

    ApiStatusEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
